namespace BizzCore.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Rules : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Rules",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        ruleName = c.String(maxLength: 255),
                        ruleField = c.String(maxLength: 255),
                        ruleExpectedValue = c.String(maxLength: 255),
                        conditionString = c.String(maxLength: 5),
                        outboxEntity_Id = c.Int(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Trays", t => t.outboxEntity_Id)
                .Index(t => t.outboxEntity_Id);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.Rules", new[] { "outboxEntity_Id" });
            DropForeignKey("dbo.Rules", "outboxEntity_Id", "dbo.Trays");
            DropTable("dbo.Rules");
        }
    }
}
